import socket
import sys
s=socket.socket(socket.AF_INET, socket.SOCK_DGRAM)
# sys.argv[1].encode()
s.sendto('{"type":"belt","id":0,"state":1}'.encode() , ("192.168.31.255" ,10000))#假设192.168.0.103是接收端机器的IP地址
s.close( )